<?php
$mysql = new SaeMysql();
$teacher = $_GET['teacher'];
$sql = "SELECT distinct`swpu_course_name`, 
	`swpu_course_addr`, 
	`swpu_course_room`, 
	`swpu_course_time`, 
	`swpu_course_teacher`, 
	`swpu_course_start`, 
	`swpu_course_end` 
	FROM `swpu_course_info` 
	WHERE `swpu_course_teacher` = '{$teacher}'";
$data = $mysql->getData($sql);
$data = json_encode($data);
echo $data;
?>